#include <ptgui/ptgui.h>
#include <ptgui/font.h>
#include <ptgui/event.h>
#include <ptgui/widgets/scene.h>

static void _ptgui_scene_constructor(ptgui_scene_t *scene)
{
	ptgui_widget_set_event_handler(PTGUI_WIDGET(scene), PTGUI_EVENT_HANDLER(ptgui_scene_event_handler));		
}

/* Destroys the scene */
static void _ptgui_scene_destructor(ptgui_scene_t *scene)
{
	
}

ptgui_type_t * ptgui_scene_type_get(void)
{
	static ptgui_type_t *scene_type = RT_NULL;

	if (!scene_type) {
		scene_type = ptgui_type_create("ptgui_scene", PTGUI_CONTAINER_TYPE, sizeof(ptgui_scene_t),
										PTGUI_CONSTRUCTOR(_ptgui_scene_constructor),
										PTGUI_DESTRUCTOR(_ptgui_scene_destructor));
	}

	return scene_type;
}

ptgui_scene_t * ptgui_scene_create(ptgui_type_t *scene_type)
{
	struct ptgui_scene *scene;

	scene = PTGUI_SCENE(ptgui_object_create(scene_type));

	return scene;
}

void ptgui_scene_destroy(ptgui_scene_t *scene)
{
	ptgui_object_destroy(PTGUI_OBJECT(scene));
}

rt_bool_t ptgui_scene_event_handler(ptgui_widget_t *scene, ptgui_event_t *event)
{
	return RT_FALSE;
}
